package com.nuotu.datawall.clouddata.util;

import android.content.Context;

/**
 * Created by nuotu on 2017-10-24.
 */

public class ServerConfig {



    /**
     * 设置每个请求的完整链接
     * 特别说明: 这里使用这种方式保存，是没能想到更加高效的方式，所以才用了这种很low的方式实现
     */
    public static void initUrl(Context context) {
        //得到token
        String baseUrl = "https://" + PrefUtils.getString(context, FinalStr.SERVER_IP_KEY, "lib.test.net");
//                + ":" + PrefUtils.getString(context, FinalStr.SERVER_POST_KEY, "");
//        String baseUrl="https://lib.test.net";
//        String baseUrl="http://lib.android.net";
//        ServerConfig.POST_TOKEN_URL_KEY =  "http://192.168.0.125:8000/oauth/token";
//        ServerConfig.POST_BASICDATA_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getBasicData";
//        ServerConfig.POST_BORROWCOUNT_7_HOT_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getBorrowCountHot";
//        ServerConfig.POST_BORROWCOUNT_10_DAY_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getBorrowCount10";
//        ServerConfig.POST_KINDCOLLECTION_URL_KEY =  "http://192.168.0.125:9910/api/kind/getKindCollectionPie";
//        ServerConfig.POST_READERCOUNT_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getBorrowReader";
//        ServerConfig.POST_DEPARTMENT_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getDepartmentBorrow";
//        ServerConfig.POST_READERCOUNT_TOP10_URL_KEY=  "http://192.168.0.125:9950/api/borrowStatistics/getReaderCount";
//        ServerConfig.POST_GETNEW_URL_KEY =  "http://192.168.0.125:9910/api/dataWall/getNews";
//        ServerConfig.POST_BORROWCOUNT_6_URL_KEY =  "http://192.168.0.125:9950/api/borrowStatistics/getBorrowCount";
        ServerConfig.POST_TOKEN_URL_KEY =  baseUrl+"/api/oauth/token";
        ServerConfig.POST_BASICDATA_URL_KEY =   baseUrl+"/api/borrowStatistics/getBasicData";
        ServerConfig.POST_BORROWCOUNT_7_HOT_URL_KEY =   baseUrl+"/api/borrowStatistics/getBorrowCountHot";
        ServerConfig.POST_BORROWCOUNT_10_DAY_URL_KEY =   baseUrl+"/api/borrowStatistics/getBorrowCount10";
        ServerConfig.POST_KINDCOLLECTION_URL_KEY =   baseUrl+"/api/kind/getKindCollectionPie";
        ServerConfig.POST_READERCOUNT_URL_KEY =   baseUrl+"/api/borrowStatistics/getBorrowReader";
        ServerConfig.POST_DEPARTMENT_URL_KEY =   baseUrl+"/api/borrowStatistics/getDepartmentBorrow";
        ServerConfig.POST_READERCOUNT_TOP10_URL_KEY=   baseUrl+"/api/borrowStatistics/getReaderCount";
        ServerConfig.POST_GETNEW_URL_KEY =   baseUrl+"/api/dataWall/getNews";
        ServerConfig.POST_BORROWCOUNT_6_URL_KEY =   baseUrl+"/api/borrowStatistics/getBorrowCount";
    }
    public static String POST_TOKEN_URL_KEY; //获取token
    public static String POST_BASICDATA_URL_KEY; //获取基础数据信息
    public static String POST_BORROWCOUNT_7_HOT_URL_KEY; //借阅量热力分布图
    public static String POST_BORROWCOUNT_10_DAY_URL_KEY; //借阅量热力分布图
    public static String POST_KINDCOLLECTION_URL_KEY; //五大部类馆藏占比
    public static String POST_READERCOUNT_URL_KEY; //读者借阅人数占比
    public static String POST_DEPARTMENT_URL_KEY; //部门借阅量
    public static String POST_READERCOUNT_TOP10_URL_KEY; //读者借阅量top10
    public static String POST_GETNEW_URL_KEY; //获取消息
    public static String POST_BORROWCOUNT_6_URL_KEY; //获取借阅量带封面
}
